import request from '@/utils/request'

export function getPictureList(query) {
  return request({
    url: '/picture/list',
    method: 'get',
    params: query
  })
}

export function getPicture(id) {
  return request({
    url: '/picture',
    method: 'get',
    params: { id }
  })
}

export function putPicture(data) {
  return request({
    url: '/picture',
    method: 'put',
    data
  })
}

export function postPicture(data) {
  return request({
    url: '/picture',
    method: 'post',
    data
  })
}

export function changePass(data) {
  return request({
    url: '/user/changePass',
    method: 'post',
    params: data
  })
}

export function deletePictureById(id) {
  return request({
    url: '/picture',
    method: 'delete',
    params: { id }
  })
}
// 分类全部

export function getAllCategory() {
  return request({
    url: '/category/all',
    method: 'get'
  })
}
